package com.heima.article.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.heima.article.mapper.ArticleMapper;
import com.heima.article.service.ArticleService;
import com.heima.model.article.dto.ArticleHomeDto;
import com.heima.model.article.pojo.ApArticle;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author ilurfucy
 * @Date 2022/8/28     9:55
 * @Description
 **/
@Service
public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, ApArticle> implements ArticleService {

    /**
     * 单页最大加载的数字
     */
    private final static short MAX_PAGE_SIZE = 50;

    @Autowired
    ArticleMapper articleMapper;

    @Override
    public List<ApArticle> getArticleListByLoadType(Short loadType, ArticleHomeDto dto) {
        return articleMapper.selectArticleList(loadType,dto);
    }
}
